home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
United Public Domain Gold 4
/
United Public Domain Gold 4.iso
/
tbag
/
tb044.dms
/
tb044.adf
/
Docs
/
Requestor.DOCs
< prev
next >
Wrap
Text File
|
1990-06-07
|
4KB
|
116 lines
Requestor V1.0 - C. Papademetrious
Features:
* small (about 1500 bytes)
* easy to use
* uses ARP parsing for extended command line support and arguments
* user-settable return code
* ability to set return code on either positive or negative response
* ability to have a one-gadget requestor with user-defineable spacing
* automatically adjusts for fonts
* uses only as much space as needed in requestor window
Requestor is a small CLI/Shell command I created after learning the
essentials of script file commands, such as IF, SKIP, and others. It
allows you to create Intuition requestors based on command line arguments,
and then notifies the script via the WARN code (or other return code). I
use it in my "C-Set" command in my C: directory, which is an executeable
script to set up for my Manx compiler. It reads as follows:
;****************************************************************************
; stuff above here
Requestor "Assign CCTEMP to:" "RAM:" "T:"
IF WARN
CCTEMP=RAM:
ELSE
CCTEMP=T:
ENDIF
Requestor "Run XOper?" Yeah Naah SWAP
IF WARN
Run PD:Xoper/Xoper
ENDIF
; other init stuff follows
;****************************************************************************
I used the Requestor command to ask me where I wanted my temporary directory
assigned to, and if I wanted to run XOper, a system monitor. This allows me
to run my programs without having to type in the entire pathname. It also
creates the possibility to have extreme flexibility in custom script files.
For example, I could create an UnLHarc executeable script as follows:
;*** Custom UnLHArc *********************************************************
.key file
Requestor "UnLHArc <file> to" T: VD0:
IF WARN
Cd VD0:
ELSE
Cd T:
ENDIF
LHArc x <file>
Requestor "Delete <file>?" Yes No SWAP
IF WARN
Delete <file>
ENDIF
Requestor Finished. 3 Continue IGNORE
;****************************************************************************
Format:
Requestor <Message> <PositiveText OR Spacing> <NegativeText>
Optional: [RET=<returnvalue>] [SWAP] [IGNORE]
The command line consists of three required arguments:
Message- main text of requestor, enclose in quotes if spaces used
PositiveText- text for left gadget, enclose in quotes if...
NegativeText- text for right gadget, enclose in quotes if...
The other arguments:
RET=<returnvalue>- use this to set your own return code. Default is
5 (WARN status)
SWAP- include this to have the failat code set when the POSITIVE, not
the NEGATIVE gadget is set. This is useful for questions best
phrased a certain way (Do you want to abort this script?
<YES> <NO>
IGNORE- this ignores the PositiveText gadget, but the PositiveText
argument is still needed. It is now used as a number to specify the
space in space characters the NegativeText gadget should be
pushed to the right.
Examples:
Requestor "Shall I continue?" YES NO
Asks "Shall I continue?"; sets WARN flag if user selects NO
Requestor "Shall I continue?" YES NO SWAP
Asks "Shall I continue?"; sets WARN flag if user selects YES
Requestor "Assign T: to:" FH0:T RAM:T
Asks "Assign T: to:", gives choices "FH0:T" and "RAM:T"; sets WARN
flag if user selects RAM:T
Requestor "Run DiskMaster in" INTERLACE NON-INTERLACE SWAP RET=10
Asks "Run DiskMaster in", gives choices "INTERLACE" and
"NON-INTERLACE"; returns code 10 if INTERLACE chosen
----------------------------------------------------------------------------
Questions? Comments?
DONATIONS???
Please contact:
Chris Papademetrious
217 Linda Terrace
Ephrata, PA 17522
(any feedback GREATLY appreciated, and WILL be answered)
and
KEEP PUBLIC DOMAIN ALIVE!